package io.tcpdump.demo01.controller;

import io.tcpdump.demo01.entity.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/tcp")
public class TcpdumpController {
  
  private static final Logger log = LoggerFactory.getLogger(TcpdumpController.class);
  
  @GetMapping("/get/{message}")
  public Result get(@PathVariable("message") String message) {
    log.info("request url: /tcp/get/{}", message);
    return Result.ok(message);
  }
}
